using TDUnit.Common.TestData;
using TDUnit.TestDataParsers.XmlParser;

namespace TDUnit.Tests
{
    public class XmlTestDataParserBase
    {
        protected static TestData Parse(string dataset)
        {
            return new XmlTestDataParser { TestDataString = dataset }.Parse();
        }

        protected static string GetDataSetForRow(string rowElementString)
        {
            return
                string.Format(
                    @"<TestData><Table Name='TableName' PrimaryKey='PrimaryKey' IsAutoIdentity='False'>{0}</Table></TestData>",
                    rowElementString);
        }
    }
}